<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui" template="/layout/template.xhtml">
	<ui:define name="body">
	<script language="JavaScript" type="text/javascript">
		window.history.forward(-1);
	</script>
		<h1 class="title ui-widget-header ui-corner-all">Lista de Factor de Sanciones</h1>
		<h:form id="frmFactorSancionFormList" prependId="false">
			<p:growl id="message" showDetail="true" />
			<p:dataTable value="#{factorSancionSearch.factorSancionList}"  
				var="c" id="factorTable" paginator="true" rows="10"
       paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
	   rowsPerPageTemplate="5,10,15" widgetVar="table"
	   emptyMessage="No se encontro registros">
					
				<p:column headerText="Descripción">
					<h:outputText value="#{c.descripcion}" />
				</p:column>
				
				<p:column headerText="Ver Sanciones">
					<p:commandButton value="sanciones"  
						action="#{SancionSearch.listar}"	icon="ui-icon ui-icon-pencil">
						<f:setPropertyActionListener value="#{c.idfactor}"
							target="#{SancionSearch.idFactor}" />
					</p:commandButton>
				</p:column>
				
				<p:column headerText="Editar">
					<p:commandButton value="Editar "  oncomplete="FactorDialog.show()" action="#{factorSancionSearch.update}" 
					update=":formFactorSancion:display" icon="ui-icon ui-icon-pencil" >
						<f:setPropertyActionListener value="#{c}" target="#{factorSancionSearch.objFactorSie}" />
					</p:commandButton>
				</p:column>
				
				<f:facet name="footer">
				<div align="left">
				<p:commandLink value="Nuevo Factor"  oncomplete="FactorDialog.show()"  
				update=":formFactorSancion:display" action="#{factorSancionSearch.agregar}"/>
				</div>
				</f:facet>
			</p:dataTable>
		</h:form>
	</ui:define>
</ui:composition>